//
//  BioBreakAppDelegate.m
//  BioBreak
//
//  Created by terry franguiadakis on 2/17/09.
//  Copyright __MyCompanyName__ 2009. All rights reserved.
//

#import "BioBreakAppDelegate.h"
#import "DbgNet.h"
#import "EAGLView.h"


@implementation BioBreakAppDelegate

@synthesize window;
@synthesize glView;
@synthesize dbgNet;

- (void)applicationDidFinishLaunching:(UIApplication *)application {
    
	glView.animationInterval = 1.0 / 60.0;
	[glView startAnimation];
    
#if DEBUG
    dbgNet = [DbgNet alloc];
    [dbgNet setDelegate:glView];
    [dbgNet startListener];
#endif //DEBUG
}


- (void)applicationWillResignActive:(UIApplication *)application {
	glView.animationInterval = 1.0 / 5.0;
}


- (void)applicationDidBecomeActive:(UIApplication *)application {
	glView.animationInterval = 1.0 / 60.0;
}


- (void)dealloc 
{
#if DEBUG
    [dbgNet stopListener];
    [dbgNet release];
#endif //DEBUG	
	
	[window release];
  	[glView release];
	[super dealloc];
}

@end
